package other;

import java.util.Observable;

import javax.swing.JTabbedPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

public class ObservableJTabbedPane extends Observable implements ChangeListener{

	private JTabbedPane tabbedPane;
	
	public ObservableJTabbedPane(JTabbedPane tabbedPane){
		this.tabbedPane = tabbedPane;
		tabbedPane.addChangeListener(this);
	}

	public JTabbedPane getJTabbedPane(){
		return tabbedPane;
	}
	
	@Override
	public void stateChanged(ChangeEvent arg0) {
		setChanged();
		notifyObservers();
	}
}
